package br.com.agiledev.webscrum.eao;

import java.util.List;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import br.com.agiledev.webscrum.entity.DailyScrum;
import br.com.agiledev.webscrum.entity.Impediment;
import br.com.agiledev.webscrum.entity.Sprint;

@Name("impedimentEAO")
@Scope(ScopeType.APPLICATION)
@AutoCreate
public class ImpedimentEAO extends BaseEAO<Impediment> {

    @SuppressWarnings("unchecked")
    public List<Impediment> porSprint(Sprint sprint, DailyScrum dailyScrum) {
	return getEntityManager().createNamedQuery("Impediment.porSprintForaDailyScrum").setParameter("sprint", sprint)
		.setParameter("dailyScrum", dailyScrum).getResultList();
    }

}
